package com.accp.info;

import java.sql.Timestamp;

/**
 * ReadercommentsId entity. @author MyEclipse Persistence Tools
 */

public class ReadercommentsId implements java.io.Serializable {

	// Fields

	private Integer id;
	private Books books;
	private String readername;
	private String title;
	private String comment;
	private Timestamp date;

	// Constructors

	/** default constructor */
	public ReadercommentsId() {
	}

	/** full constructor */
	public ReadercommentsId(Integer id, Books books, String readername,
			String title, String comment, Timestamp date) {
		this.id = id;
		this.books = books;
		this.readername = readername;
		this.title = title;
		this.comment = comment;
		this.date = date;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Books getBooks() {
		return this.books;
	}

	public void setBooks(Books books) {
		this.books = books;
	}

	public String getReadername() {
		return this.readername;
	}

	public void setReadername(String readername) {
		this.readername = readername;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Timestamp getDate() {
		return this.date;
	}

	public void setDate(Timestamp date) {
		this.date = date;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ReadercommentsId))
			return false;
		ReadercommentsId castOther = (ReadercommentsId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getBooks() == castOther.getBooks()) || (this
						.getBooks() != null && castOther.getBooks() != null && this
						.getBooks().equals(castOther.getBooks())))
				&& ((this.getReadername() == castOther.getReadername()) || (this
						.getReadername() != null
						&& castOther.getReadername() != null && this
						.getReadername().equals(castOther.getReadername())))
				&& ((this.getTitle() == castOther.getTitle()) || (this
						.getTitle() != null && castOther.getTitle() != null && this
						.getTitle().equals(castOther.getTitle())))
				&& ((this.getComment() == castOther.getComment()) || (this
						.getComment() != null && castOther.getComment() != null && this
						.getComment().equals(castOther.getComment())))
				&& ((this.getDate() == castOther.getDate()) || (this.getDate() != null
						&& castOther.getDate() != null && this.getDate()
						.equals(castOther.getDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getBooks() == null ? 0 : this.getBooks().hashCode());
		result = 37
				* result
				+ (getReadername() == null ? 0 : this.getReadername()
						.hashCode());
		result = 37 * result
				+ (getTitle() == null ? 0 : this.getTitle().hashCode());
		result = 37 * result
				+ (getComment() == null ? 0 : this.getComment().hashCode());
		result = 37 * result
				+ (getDate() == null ? 0 : this.getDate().hashCode());
		return result;
	}

}